#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QGamepad>
#include <QTcpSocket>
#include <QHostAddress>
#include <QByteArray>
#include <QTimer>

#include "gamepadvalue.h"
#include "controlmsgframe.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    QTimer* myTimer;
    QGamepad* myGamepad;
    GamepadValue* myPadValue;
    ControlMsgFrame* myMsg;
    void Gamepad_ChangeAxisValue(int Chanel, double value);
    void ProgressBar_Repaint();
    void Gamepad_ChangeBoolValue(int Chanel, bool value);
    void on_tcpSocket_readyRead();
    void SendMsgFrame();
private slots:


    void on_pushButtonConnect_clicked();

    void on_pushButtonSend_clicked();

    void on_textEditShow_textChanged();

private:
    Ui::MainWindow *ui;
    QTcpSocket *tcpSocket;
};
#endif // MAINWINDOW_H
